import {
  checkCodeApi,
  registerApi,
  getProfileConfig,
  saveUserInfo,
  homeInfoApi,
  focusApi,
  cancelFocusApi,
  recommendAuthorApi
} from './api/api.js'

export const store = {
  state: {
  },
  mutations: {

  },
  actions: {
    CHECK_CODE: ({ commit, state }, params) => {
      return checkCodeApi(params)
    },
    REGISTER_USER: ({ commit, state }, params) => {
      return registerApi(params)
    },
    GET_PROFILE: ({ commit, state }, params) => {
      return getProfileConfig(params)
    },
    SAVE_USER_INFO: ({ commit, state }, params) => {
      return saveUserInfo(params)
    },
    HOME_INFO: ({ commit, state }, params) => {
      return homeInfoApi(params)
    },
    DO_FOCUS: ({ commit, state }, params) => {
      return focusApi(params)
    },
    CANCEL_FOCUS: ({ commit, state }, params) => {
      return cancelFocusApi(params)
    },
    GET_RECOMMEND_AUTHOR_LIST: ({ commit, state }, params) => {
      return recommendAuthorApi(params)
    }
  }
}
